package com.yanqu.road.logic.bussiness.player.activity;

import com.yanqu.road.entity.activity.UserActivityConditionData;
import com.yanqu.road.entity.activity.stronghold.*;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.List;
import java.util.Map;

public class UserStrongholdBusiness {
    public static Map<Integer, StrongholdWarUserData> getStrongholdWarUserData(long userId) {
        return DaoHelper.getUserStrongholdWarDataDaoImpl().getStrongholdWarUserData(userId);
    }

    public static boolean addStrongholdUserData(StrongholdWarUserData data) {
        return DaoHelper.getUserStrongholdWarDataDaoImpl().add(data);
    }

    public static boolean updateStrongholdUserData(StrongholdWarUserData data) {
        return DaoHelper.getUserStrongholdWarDataDaoImpl().update(data);
    }

    public static Map<Integer, StrongholdHouseData> getStrongholdHouseData(int activityId, int groupId) {
        return DaoHelper.getStrongholdHouseDataDaoImpl().getStrongholdHouseData(activityId, groupId);
    }

    public static boolean addHouseData(StrongholdHouseData houseData) {
        return DaoHelper.getStrongholdHouseDataDaoImpl().add(houseData);
    }

    public static boolean updateHouseData(StrongholdHouseData houseData) {
        return DaoHelper.getStrongholdHouseDataDaoImpl().update(houseData);
    }

    public static List<StrongholdWildUserData> getAllStrongholdWildUserData(int activityId) {
        return DaoHelper.getStrongholdWildUserDataDaoImpl().getStrongholdWildUserData(activityId);
    }

    public static boolean addWildUser(StrongholdWildUserData wildUserData) {
        return DaoHelper.getStrongholdWildUserDataDaoImpl().add(wildUserData);
    }

    public static boolean updateWildUser(StrongholdWildUserData wildUserData) {
        return DaoHelper.getStrongholdWildUserDataDaoImpl().update(wildUserData);
    }

    public static boolean addBox(StrongholdWildBox box) {
        return DaoHelper.getStrongholdWildBoxDaoImpl().add(box);
    }

    public static boolean updateBox(StrongholdWildBox box) {
        return DaoHelper.getStrongholdWildBoxDaoImpl().update(box);
    }

    public static Map<Integer, StrongholdWildBox> getWildBox(int activityId, int groupId) {
        return DaoHelper.getStrongholdWildBoxDaoImpl().getStrongholdWildBox(activityId, groupId);
    }

    public static Map<Integer, StrongholdPatronsData> getStrongholdPatronsMap(int activityId,long userId) {
        return DaoHelper.getStrongholdPatronsDaoImpl().getStrongholdPatronsData(activityId,userId);
    }

    public static boolean addStrongholdPatrons(StrongholdPatronsData patronsData) {
         return DaoHelper.getStrongholdPatronsDaoImpl().add(patronsData);
    }

    public static boolean updateStrongholdPatrons(StrongholdPatronsData patronsData) {
        return DaoHelper.getStrongholdPatronsDaoImpl().update(patronsData);
    }

    public static Map<Integer, List<StrongholdWildReport>> getWildReport(long userId, int activityId) {
        return DaoHelper.getStrongholdWildReportDaoImpl().getStrongholdWildReport(activityId, userId);
    }

    public static boolean addWildReport(StrongholdWildReport report) {
        return DaoHelper.getStrongholdWildReportDaoImpl().add(report);
    }


    public static Map<Integer, List<UserActivityConditionData>> getUserActivityConditionDataMap(long userId, int activityId) {
        return DaoHelper.getUserStrongholdActivityDaoImpl().getUserActivityConditionDataMap(userId, activityId);
    }

    public static boolean addUserActivityConditionData(UserActivityConditionData conditionData) {
       return DaoHelper.getUserStrongholdActivityDaoImpl().add(conditionData);
    }

    public static boolean updateUserActivityConditionData(UserActivityConditionData conditionData) {
        return DaoHelper.getUserStrongholdActivityDaoImpl().update(conditionData);
    }

    public static List<UserActivityConditionData> getUserActivityConditionDataList(int activityId, Integer conditionType, int rankNum) {
        return DaoHelper.getUserStrongholdActivityDaoImpl().getUserActivityConditionDataList( activityId,conditionType,rankNum);
    }

    public static Map<Long, UserActivityConditionData> getUserActivityConditionTypeDataMap(int activityId, int conditionType) {
        return DaoHelper.getUserStrongholdActivityDaoImpl().getUserActivityConditionTypeDataMap(activityId, conditionType);
    }
    public static boolean addEliminatePatrons(StrongholdEliminateDefendPatrons patrons) {
        return DaoHelper.getStrongholdEliminatePatronsDaoImpl().add(patrons);
    }

    public static boolean updateEliminatePatrons(StrongholdEliminateDefendPatrons patrons) {
        return DaoHelper.getStrongholdEliminatePatronsDaoImpl().update(patrons);
    }

    public static Map<String, Map<Long, List<StrongholdEliminateDefendPatrons>>> getEliminatePatrons(int activityId) {
        return DaoHelper.getStrongholdEliminatePatronsDaoImpl().getStrongholdEliminateDefendPatrons(activityId);
    }

    public static Map<Integer, StrongholdUploadMark> getUploadMarkMap(int activityId) {
        return DaoHelper.getStrongholdUploadMarkDaoImpl().getStrongholdUploadMark(activityId);
    }

    public static boolean addUploadMark(StrongholdUploadMark mark) {
        return DaoHelper.getStrongholdUploadMarkDaoImpl().add(mark);
    }

    public static boolean updateUploadMark(StrongholdUploadMark mark) {
        return DaoHelper.getStrongholdUploadMarkDaoImpl().update(mark);
    }

    public static Map<Long, StrongholdTradeData> getStrongholdTradeMap(int activityId) {
        return DaoHelper.getStrongholdTradeDaoImpl().getStrongholdTradeData(activityId);
    }

    public static boolean addStrongholdTrade(StrongholdTradeData data) {
        return DaoHelper.getStrongholdTradeDaoImpl().add(data);
    }

    public static boolean updateStrongholdTrade(StrongholdTradeData data) {
        return DaoHelper.getStrongholdTradeDaoImpl().update(data);
    }

    public static Map<Long, Map<Integer, List<UserActivityConditionData>>> getAllUserActivityConditionDataMap(int activityId) {
        return DaoHelper.getUserStrongholdActivityDaoImpl().getAllUserActivityConditionDataMap( activityId);
    }


    public static boolean updateWildReport(StrongholdWildReport report) {
        return DaoHelper.getStrongholdWildReportDaoImpl().update(report);
    }
}
